<?php /* Smarty version 2.6.26, created on 2015-08-21 17:50:34
         compiled from index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'date_format', 'index.html', 36, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "../Common/header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
	<link rel="stylesheet" href="./Public/Home/Css/question.css" />
	<script type="text/javascript" src="./Public/Home/Js/question.js"></script>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "../Common/nav.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

	
	<div id='location'>
		<a href="./index.php?c=list&cid=0&asid=0">全部分类</a>
		<?php unset($this->_sections['k']);
$this->_sections['k']['loop'] = is_array($_loop=$this->_tpl_vars['parentsCate']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['k']['name'] = 'k';
$this->_sections['k']['show'] = true;
$this->_sections['k']['max'] = $this->_sections['k']['loop'];
$this->_sections['k']['step'] = 1;
$this->_sections['k']['start'] = $this->_sections['k']['step'] > 0 ? 0 : $this->_sections['k']['loop']-1;
if ($this->_sections['k']['show']) {
    $this->_sections['k']['total'] = $this->_sections['k']['loop'];
    if ($this->_sections['k']['total'] == 0)
        $this->_sections['k']['show'] = false;
} else
    $this->_sections['k']['total'] = 0;
if ($this->_sections['k']['show']):

            for ($this->_sections['k']['index'] = $this->_sections['k']['start'], $this->_sections['k']['iteration'] = 1;
                 $this->_sections['k']['iteration'] <= $this->_sections['k']['total'];
                 $this->_sections['k']['index'] += $this->_sections['k']['step'], $this->_sections['k']['iteration']++):
$this->_sections['k']['rownum'] = $this->_sections['k']['iteration'];
$this->_sections['k']['index_prev'] = $this->_sections['k']['index'] - $this->_sections['k']['step'];
$this->_sections['k']['index_next'] = $this->_sections['k']['index'] + $this->_sections['k']['step'];
$this->_sections['k']['first']      = ($this->_sections['k']['iteration'] == 1);
$this->_sections['k']['last']       = ($this->_sections['k']['iteration'] == $this->_sections['k']['total']);
?>
			<?php if ($this->_sections['k']['last']): ?>
			&gt;&nbsp;<?php echo $this->_tpl_vars['parentsCate'][$this->_sections['k']['index']]['title']; ?>
&nbsp;&nbsp;
			<?php else: ?>
			&gt;&nbsp;<a href="./index.php?c=list&cid=<?php echo $this->_tpl_vars['parentsCate'][$this->_sections['k']['index']]['cid']; ?>
"><?php echo $this->_tpl_vars['parentsCate'][$this->_sections['k']['index']]['title']; ?>
</a>&nbsp;&nbsp;
			<?php endif; ?>
		<?php endfor; endif; ?>	
	</div>
		

<!--------------------中部-------------------->
	<div id='center-wrap'>
		<div id='center'>
			<div id='left'>
				<div id='answer-info'>
					<!-- 如果没有解决用wait -->
					<div class='ans-state <?php if ($this->_tpl_vars['askTitle']['0']['solve'] == 0): ?> wait <?php endif; ?>'></div>
					<div class='answer'>
						<p class='ans-title'><?php echo $this->_tpl_vars['askTitle']['0']['content']; ?>

							<b class='point'><?php echo $this->_tpl_vars['askTitle']['0']['reward']; ?>
</b>
						</p>
					</div>
			<!-- 问题用户信息 -->
					<ul>
						<li><a href=""><?php echo $this->_tpl_vars['askTitle']['0']['username']; ?>
</a></li>
						<li><i class='level lv1' title='Level 1'></i></li>
						<li><?php echo ((is_array($_tmp=$this->_tpl_vars['askTitle']['0']['time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d %H:%M:%S") : smarty_modifier_date_format($_tmp, "%Y-%m-%d %H:%M:%S")); ?>
</li>
				
					</ul>
					<!--1.必须登陆-->
					<!--2.问题不能是自己的问题-->
					<!--3.问题必须没有被解决-->

			<?php if ($_SESSION['username'] && $_SESSION['uid'] && $_SESSION['uid'] != $this->_tpl_vars['askTitle']['0']['uid'] && $this->_tpl_vars['askTitle']['0']['slove'] == 0): ?>
					<div class='ianswer'>
						<form name='answer' action="" method='POST'>
							<p>我来回答</p>
							<textarea name="content"></textarea>
							<input type="hidden" name='qid' value='<?php echo $_GET['asid']; ?>
'>
							<input type="submit" value='提交回答' id='anw-sub'/>
						</form>
					</div>
			<?php endif; ?>
			
			<?php if ($this->_tpl_vars['accept']): ?>
					<!-- 满意回答 -->
					<div class='ans-right'>
						<p class='title'><i></i>满意回答<span></span></p>
						<p class='ans-cons'><?php echo $this->_tpl_vars['accept']['0']['content']; ?>
</p>
						<dl>
							<dt>
								<a href=""><img src="./Public/Home/Images/noface.gif" width='48' height='48'/></a>
							</dt>
							<dd>
								<a href=""><?php echo $this->_tpl_vars['accept']['0']['username']; ?>
</a>
							</dd>
							<dd><i class='level lv1'></i></dd>
							<dd>20%</dd>
						</dl>
					</div>
					<!-- 满意回答 -->
			<?php endif; ?>
				</div>

				<div id='all-answer'>
					<div class='ans-icon'></div>
					<p class='title'>共 <strong><?php echo $this->_tpl_vars['totalAnswer']; ?>
</strong> 条回答</p>
					<ul>
					<?php $_from = $this->_tpl_vars['answerData']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['v']):
?>
						<!-- 显示未采纳的列表 -->
						<?php if ($this->_tpl_vars['v']['saccept'] == 0): ?>	
						<li>
							<div class='face'>
								<a href="">
									<img src="./Public/Home/Images/noface.gif" width='48' height='48'/>
								</a>
							</div>
							<div class='cons blue'>
								<p><?php echo $this->_tpl_vars['v']['scontent']; ?>
<span style='color:#888;font-size:12px'>&nbsp;&nbsp;(<?php echo ((is_array($_tmp=$this->_tpl_vars['v']['stime'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d %H:%M:%S") : smarty_modifier_date_format($_tmp, "%Y-%m-%d %H:%M:%S")); ?>
)</span></p>
							</div>
							<?php if ($_SESSION['username'] && $_SESSION['uid'] && $_SESSION['username'] == $this->_tpl_vars['v']['username']): ?>
								<a href="./index.php?c=show&a=accept&anid=<?php echo $this->_tpl_vars['v']['anid']; ?>
" class='adopt-btn'>采纳</a>
							<?php endif; ?>
						</li>
						<?php endif; ?>
					<?php endforeach; endif; unset($_from); ?>

					</ul>
					<div class='page'>
						<a href="">1</a>
						<a href="">2</a>
						<a href="">3</a>
						<a href="">4</a>
					</div>
				</div>
				<?php if ($this->_tpl_vars['relateAsk']): ?>
				<div id='other-ask'>
					<p class='title'>待解决的相关问题</p>
					<table>
						<?php $_from = $this->_tpl_vars['relateAsk']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['v']):
?>
						<tr>
							<td class='t1'><a href="./index.php?c=show&asid=<?php echo $this->_tpl_vars['v']['asid']; ?>
"><?php echo $this->_tpl_vars['v']['content']; ?>
</a></td>
							<td>20&nbsp;回答</td>
							<td><?php echo ((is_array($_tmp=$this->_tpl_vars['v']['time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d %H:%M") : smarty_modifier_date_format($_tmp, "%Y-%m-%d %H:%M")); ?>
</td>
						</tr>
						<?php endforeach; endif; unset($_from); ?>
					</table>
				</div>
				<?php endif; ?>
			</div>
		<!-- 右侧 -->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => '../Common/right.html', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<!-- ---右侧结束---- -->
			
		</div>

	</div>
	
<!--------------------中部结束-------------------->
	<?php echo '
	<script type="text/javascript">
		$(function(){
			$("form[name=\'answer\']").submit(function(event) {
				var content = $.trim($("textarea[name=\'content\']").val());
				if(!content){
					$.cxDialog(\'内容不能为空\');
					return false;
				}
			});
		})
	</script>
	'; ?>

<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "../Common/footer.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>